/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$(".btn-st").click(function(){
    var id = $(this).data("id");
    var datastr = "cont=8&projectdesid=" + id;
    $.ajax({
        url: "/../../controller/project/projectdescontroller.php",
        type: "POST",
        data: datastr,
        success: function (e) {
            var result = eval("(" + e + ")");
            if (result.code == 0) {
                layer.msg('操作成功', {
                    time: 2000, //20s后自动关闭
                    btn: ['OK']
                }, function () {
                    window.location.reload();
                });
            }else{
                layer.msg('操作失败,请刷新重试', {
                    time: 2000, //20s后自动关闭
                    btn: ['OK']
                });
            }
        }
    });
});

$(".btn-tp").click(function(){
    var id = $(this).data("id");
    var datastr = "cont=7&projectdesid=" + id;
    $.ajax({
        url: "/../../controller/project/projectdescontroller.php",
        type: "POST",
        data: datastr,
        success: function (e) {
            var result = eval("(" + e + ")");
            if (result.code == 0) {
                layer.msg('操作成功', {
                    time: 2000, //20s后自动关闭
                    btn: ['OK']
                }, function () {
                    window.location.reload();
                });
            }else{
                layer.msg('操作失败,请刷新重试', {
                    time: 2000, //20s后自动关闭
                    btn: ['OK']
                });
            }
        }
    });
});

function stopall(ids){
    var datastr = "cont=9&ids=" + ids;
    $.ajax({
        url: "/../../controller/project/projectdescontroller.php",
        type: "POST",
        data: datastr,
        success: function (e) {
            var result = eval("(" + e + ")");
            if (result.code == 0) {
                layer.msg('操作成功', {
                    time: 2000, //20s后自动关闭
                    btn: ['OK']
                }, function () {
                    window.location.reload();
                });
            } else {
                layer.msg('操作失败,请刷新重试', {
                    time: 2000, //20s后自动关闭
                    btn: ['OK']
                });
            }
        }
    });
}

function startall(dis){
    var datastr = "cont=10&ids=" + ids;
    $.ajax({
        url: "/../../controller/project/projectdescontroller.php",
        type: "POST",
        data: datastr,
        success: function (e) {
            var result = eval("(" + e + ")");
            if (result.code == 0) {
                layer.msg('操作成功', {
                    time: 2000, //20s后自动关闭
                    btn: ['OK']
                }, function () {
                    window.location.reload();
                });
            } else {
                layer.msg('操作失败,请刷新重试', {
                    time: 2000, //20s后自动关闭
                    btn: ['OK']
                });
            }
        }
    });
}